package com.mindata.blockmanager.bean;

import java.util.List;

/**
 * @author wangxinguo
 * @date 2015-5-9
 * @time 下午3:37:38
 * ajax grid结果
 */
public final class GridResultDto<T> {

	private List<T> rows;// 结果集
	private long total;//总记录数
	

	private GridResultDto(){
		
	}
	
	public static <E> GridResultDto<E> createGridResultDto(List<E> items, long totalItems){
		GridResultDto<E> dto = new GridResultDto<E>();
		dto.setRows(items);
		dto.setTotal(totalItems);
		return dto;
	}
	
	public List<T> getRows() {
		return rows;
	}
	public void setRows(List<T> rows) {
		this.rows = rows;
	}
	public long getTotal() {
		return total;
	}
	public void setTotal(long total) {
		this.total = total;
	}
}
